package com.gjy.check.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-08-11 10:41:48
 */
public class CheckUtil {
    public static Boolean isEmail(Object value) {
        if (value == null) {
            return Boolean.FALSE;
        }
        if (value instanceof String) {
            String regEx = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$";
            Pattern p = Pattern.compile(regEx);
            Matcher m = p.matcher((String) value);
            if (m.matches()) {
                return Boolean.TRUE;
            }
        }
        return Boolean.FALSE;
    }
}
